package top.ikaros.vpn.whiteopen.controller;

import java.io.InputStream;

//https://blog.csdn.net/sunroyi666/article/details/68066480
public class PrintStream extends Thread {
    private InputStream is;

    public PrintStream(InputStream inputStream) {
        is = inputStream;
    }

    public void run() {
        try {
            while (true) {
                int _ch = is.read();
                if (_ch != -1)
                    System.out.print((char) _ch);
                else break;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}